package common

import (
	"company_website/src/api"
	"github.com/gin-gonic/gin"
)

type New struct{}

func (n *New) InitRouter(router *gin.RouterGroup) {
	News := router.Group("news")
	{
		News.GET("list", api.New.GetNewList)
		News.GET("detail", api.New.GetNewInfoById)
		News.GET("knowMore", api.New.KnowMoreNewInfo)
		News.GET("Search", api.New.SearchNew)
		News.POST("PostNews", api.New.PublishNew)
	}
}
